num = int(input())
hundrad = num // 100
tens = (num // 10) % 10  # 228  228/10=22 22%10=2
unit = num % 10
new_num = unit * 100 + tens * 10 + hundrad
print(new_num)